package com.demo2do.boyle.client.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.demo2do.boyle.client.service.MaterialImageService;
import com.demo2do.boyle.common.entity.aduser.material.Material;
import com.demo2do.boyle.common.entity.aduser.material.MaterialImage;
import com.demo2do.core.service.impl.GenericServiceImpl;

@Service("materialSerive")
public class MaterialServiceImpl extends GenericServiceImpl<MaterialImage> implements MaterialImageService {

	/*
	 * (non-Javadoc)
	 * @see com.demo2do.boyle.client.service.MaterialImageService#materialImages(com.demo2do.boyle.common.entity.aduser.material.Material)
	 */
	@SuppressWarnings("unchecked")
	public List<MaterialImage> list(Material material) {
		return genericDaoSupport.searchForList("FROM MaterialImage materialImage WHERE materialImage.material = :material", "material", material);
	}
	
}
